﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [Table(Name = "baozhangzhuangbeiiot")]
    public class BaoZhangZhuangBeiIOT
    {
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [Column(Name = "bzzbtid")]
        [JsonProperty("bzzbtid")]
        [Description("保障装备类型ID")]
        public long Bzzbtid { get; set; }

        [Column(Name = "bzzbid")]
        [JsonProperty("bzzbid")]
        [Description("保障装备ID，车辆类或者设备类ID")]
        public long Bzzbid { get; set; }

        [Column(Name = "jtid")]
        [JsonProperty("jtid")]
        [Description("具体车辆或者设备ID")]
        public long Jtid { get; set; }

        [Column(Name = "gjid")]
        [JsonProperty("gjid")]
        [Description("具体车辆或者设备下的构件ID")]
        public long Gjid { get; set; }

        #region 需要从传感器传过来的字段

        [Column(Name = "dpzt")]
        [JsonProperty("dpzt")]
        [Description("底盘状态")]
        public string Dpzt { get; set; }

        [Column(Name = "fdjzt")]
        [JsonProperty("fdjzt")]
        [Description("发动机状态")]
        public string Fdjzt { get; set; }

        [Column(Name = "xdcdy")]
        [JsonProperty("xdcdy")]
        [Description("蓄电池电压")]
        public long Xdcdy { get; set; }

        [Column(Name = "yxyl")]
        [JsonProperty("yxyl")]
        [Description("油箱油量")]
        public string Yxyl { get; set; }

        [Column(Name = "yh")]
        [JsonProperty("yh")]
        [Description("油耗")]
        public long Yh { get; set; }

        [Column(Name = "ltqy")]
        [JsonProperty("ltqy")]
        [Description("轮胎气压")]
        public string Ltqy { get; set; }

        [Column(Name = "sxwd")]
        [JsonProperty("sxwd")]
        [Description("水箱温度")]
        public string Sxwd { get; set; }

        [Column(Name = "hy")]
        [JsonProperty("hy")]
        [Description("滑油")]
        public string Hy { get; set; }

        [Column(Name = "xssd")]
        [JsonProperty("xssd")]
        [Description("行驶速度")]
        public string Xssd { get; set; }

        [Column(Name = "sczt")]
        [JsonProperty("sczt")]
        [Description("刹车状态")]
        public string Sczt { get; set; }

        [Column(Name = "zxwz")]
        [JsonProperty("zxwz")]
        [Description("最新位置")]
        public string Zxwz { get; set; }

        [Column(Name = "ygyl")]
        [JsonProperty("ygyl")]
        [Description("油罐油量")]
        public string Ygyl { get; set; }

        [Column(Name = "mqzt")]
        [JsonProperty("mqzt")]
        [Description("目前状态")]
        public string Mqzt { get; set; }

        [Column(Name = "ljsysj")]
        [JsonProperty("ljsysj")]
        [Description("累计使用时间")]
        public string Ljsysj { get; set; }

        [Column(Name = "lhdw")]
        [JsonProperty("lhdw")]
        [Description("L/H单位")]
        public string Lhdw { get; set; }

        [Column(Name = "ldw")]
        [JsonProperty("ldw")]
        [Description("L单位")]
        public string Ldw { get; set; }

        [Column(Name = "kmdw")]
        [JsonProperty("kmdw")]
        [Description("km单位")]
        public string Kmdw { get; set; }

        [Column(Name = "cidw")]
        [JsonProperty("cidw")]
        [Description("次单位")]
        public string Cidw { get; set; }

        [Column(Name = "tiandw")]
        [JsonProperty("tiandw")]
        [Description("天单位")]
        public string Tiandw { get; set; }

        [Column(Name = "hdw")]
        [JsonProperty("hdw")]
        [Description("h单位")]
        public string Hdw { get; set; }

        [Column(Name = "totalsj")]
        [JsonProperty("totalsj")]
        [Description("总共使用时间")]
        public string Totalsj { get; set; }

        [Column(Name = "totalsyl")]
        [JsonProperty("totalsyl")]
        [Description("总共使用量")]
        public string Totalsyl { get; set; }

        #endregion

        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("created")]
        public DateTime Created { get; set; }

        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("updated")]
        public DateTime Updated { get; set; }
    }
}
